The Code Behind The Hertzsprung-Russell Diagram From Gaia Data